﻿<?xml version="1.0" encoding="utf-8" ?>
<SourceAnalyzer Name="Jeff LeBert Maintainability Rules">
  <Description>
    Rules that find maintainability issues.
  </Description>
  <Rules>
    <Rule Name="CheckForNullInDispose" CheckId="JS1101">
      <Context>Check for null before using the '{0}' member. This would cause an exception if the Dispose was called more than once.</Context>
      <Description>A Dispose method may be called more than once. Therefore, if a member is set to null anywhere in the Dispose method, you should verify it is not null before using it.</Description>
    </Rule>
    <Rule Name="DisposeComponentsFieldCorrectly" CheckId="JS1100">
      <Context>{0}</Context>
      <Description>The components field should be disposed inside its own if. Your dispose code should look like this:
protected override void Dispose(bool disposing)
{
    if (disposing)
    {
        if (this.components != null)
        {
            this.components.Dispose();
        }
    }

    base.Dispose(disposing);
}</Description>
    </Rule>
  </Rules>
</SourceAnalyzer>